﻿CREATE TABLE [dbo].[Actividad] (
    [ActividadId]     INT          IDENTITY (1, 1) NOT NULL,
    [Nombre]          VARCHAR (50) NOT NULL,
    [TipoActividadId] INT          NOT NULL,
    [Activa]          BIT          DEFAULT ((1)) NOT NULL,
    [ResponsableId]   INT NULL,
    [FechaBaja] DATE NULL, 
    CONSTRAINT [PK_Actividad] PRIMARY KEY CLUSTERED ([ActividadId] ASC) WITH (FILLFACTOR = 80),
    CONSTRAINT [FK_Actividad_TipoActividad] FOREIGN KEY ([TipoActividadId]) REFERENCES [dbo].[TipoActividad] ([TipoActividadId]),
	CONSTRAINT [FK_Actividad_Agente] FOREIGN KEY ([ResponsableId]) REFERENCES [dbo].[Agente] ([AgenteId])
);

